<template>
  <z-modal
    v-bind="modalOption"
    @ok="handleOk"
    @cancel="handleCancel"
    cancelText="关闭"
  >
    <a-spin :spinning="confirmLoading">
      <a-form-model layout="horizontal" labelAlign="right" ref="ruleForm" :label-col="labelCol" :wrapper-col="wrapperCol" :model="form" :rules="validatorRules">
        <a-row>
          <a-col :span="12" >
            <a-form-model-item label="简历名称" prop = "resumeName" >
              <a-input v-model.trim="form.resumeName" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="简历类型" prop = "resumeTypeStr" >
              <a-input v-model.trim="form.resumeTypeStr" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="简历语言" prop = "lanType" >
              <a-input v-model.trim="form.lanTypeStr" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="姓名" prop = "personalInfo.name" >
              <a-input v-model.trim="form.personalInfo.name" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="性别" prop = "personalInfo.sex" >
              <a-input v-model.trim="form.personalInfo.sexStr" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="出生日期" prop = "personalInfo.birthday" >
              <a-input  v-model.trim="form.personalInfo.birthday" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="民族" prop = "personalInfo.nation" >
              <a-input  v-model.trim="form.personalInfo.nation" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="政治面貌" prop = "personalInfo.political" >
              <a-input   v-model.trim="form.personalInfo.political" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="婚姻状况" prop = "personalInfo.maritalStatus" >
              <a-input   v-model.trim="form.personalInfo.maritalStatusStr" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="户口所在地" prop = "personalInfo.homeTown" >
              <a-input  v-model.trim="form.personalInfo.homeTown" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="家庭住址" prop = "personalInfo.liveCity" >
              <a-input  v-model.trim="form.personalInfo.liveCity" disabled/>
            </a-form-model-item>
          </a-col>
<!--          <a-col :span="12" >
            <a-form-model-item label="工作年限" prop = "personalInfo.workYears" >
              <a-input  v-model.trim="form.personalInfo.workYears" disabled/>
            </a-form-model-item>
          </a-col>-->
          <a-col :span="12" >
            <a-form-model-item label="外语及水平" prop = "personalInfo.foreignLanguage" >
              <a-input  v-model.trim="form.personalInfo.foreignLanguage" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="第一学历" prop = "firstDegree" >
              <a-input  v-model.trim="form.firstDegree" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="最高学历" prop = "highestDegree" >
              <a-input  v-model.trim="form.highestDegree" disabled/>
            </a-form-model-item>
          </a-col>

          <a-col :span="12" >
            <a-form-model-item label="学校类别" prop = "schoolType" >
              <z-dict-select-tag v-model="form.schoolType" :disabled=true dictCode="TALENT_SCHOOL_TYPE"/>
            </a-form-model-item>
          </a-col>

          <a-col :span="12" >
            <a-form-model-item label="驾照" prop = "personalInfo.driverLicense" >
              <a-input  v-model.trim="form.personalInfo.driverLicense" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="身份证号" prop = "personalInfo.idNumber" >
              <a-input  v-model.trim="form.personalInfo.idNumber" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="手机号" prop = "personalInfo.phone" >
              <a-input  v-model.trim="form.personalInfo.phone" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="身高" prop = "personalInfo.height" >
              <a-input  v-model.trim="form.personalInfo.height" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="体重" prop = "personalInfo.weight" >
              <a-input  v-model.trim="form.personalInfo.weight" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="紧急联系人" prop = "personalInfo.emergencyContact" >
              <a-input  v-model.trim="form.personalInfo.emergencyContact" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="紧急联系方式" prop = "personalInfo.emergencyPhone" >
              <a-input  v-model.trim="form.personalInfo.emergencyPhone" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="电子邮箱" prop = "personalInfo.email" >
              <a-input  v-model.trim="form.personalInfo.email" disabled/>
            </a-form-model-item>
          </a-col>
          <a-col :span="23" >
            <a-form-model-item :labelCol="{ span: 4/2 }"  :wrapperCol="{ span: 21 }" label="个人优势">
              <a-input :disabled="disableSubmit" type="textarea" v-model="form.advantage"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="23" >
            <a-form-model-item :labelCol="{ span: 4/2 }"  :wrapperCol="{ span: 21 }" label="主要研究方向及成果(校招)">
              <a-input :disabled="disableSubmit" type="textarea" v-model="form.majorResearchDirection"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="23" >
            <a-form-model-item :labelCol="{ span: 4/2 }"  :wrapperCol="{ span: 21 }" label="自我综合评价">
              <a-input :disabled="disableSubmit" type="textarea" v-model="form.selfEvaluation"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="23" >
            <a-form-model-item :labelCol="{ span: 4/2 }"  :wrapperCol="{ span: 21 }" label="其他情况(校招)">
              <a-input :disabled="disableSubmit" type="textarea" v-model="form.otherSituations"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="23" >
            <a-form-model-item :labelCol="{ span: 4/2 }"  :wrapperCol="{ span: 21 }" label="主要工作业绩(社招)">
              <a-input :disabled="disableSubmit" type="textarea" v-model="form.majorWorkPerformance"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="是否签订三方协议" prop = "tripartiteAgreement" >
              <a-input  v-model.trim="form.tripartiteAgreement" disabled/>
            </a-form-model-item>
          </a-col>
        </a-row>
      </a-form-model>
    </a-spin>
  </z-modal>
</template>

<script>
import ModalFormMixin from '@/mixins/ModalFormMixin'
import ZDictSelectTag from '@/components/dict/ZDictSelectTag'
export default {
  name: 'TalentModal',
  components: { ZDictSelectTag },
  mixins: [ModalFormMixin],
  data() {
    return {
      validatorRules: {
      },
      url: {
        add: '',
        edit: ''
      }
    }
  },
  methods: {
    close() {
      this.$emit('close')
      this.model = {}
      this.$refs.ruleForm && this.$refs.ruleForm.resetFields()
      this.visible = false
      // this.disableSubmit = false
    }
  }
}
</script>

